﻿#region Using directives

using System;
using System.Data;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;

using NiSis.Entities;
using NiSis.Data;

#endregion

namespace NiSis.Data.Bases
{	
	///<summary>
	/// This class is the base class for any <see cref="SshUtenzeGasProviderBase"/> implementation.
	/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
	///</summary>
	public abstract partial class SshUtenzeGasProviderBaseCore : EntityProviderBase<NiSis.Entities.SshUtenzeGas, NiSis.Entities.SshUtenzeGasKey>
	{		
		#region Get from Many To Many Relationship Functions
		#endregion	
		
		#region Delete Methods

		/// <summary>
		/// 	Deletes a row from the DataSource.
		/// </summary>
		/// <param name="transactionManager">A <see cref="TransactionManager"/> object.</param>
		/// <param name="key">The unique identifier of the row to delete.</param>
		/// <returns>Returns true if operation suceeded.</returns>
		public override bool Delete(TransactionManager transactionManager, NiSis.Entities.SshUtenzeGasKey key)
		{
			return Delete(transactionManager, key.CdMeseInizioFornitura, key.CdPuntoFornitura);
		}
		
		/// <summary>
		/// 	Deletes a row from the DataSource.
		/// </summary>
		/// <param name="_cdMeseInizioFornitura">Mese di attivazione fornitura (switch in). Primary Key.</param>
		/// <param name="_cdPuntoFornitura">Codice identificativo del punto di fornitura (un cliente può avere più punti di fornitura). Primary Key.</param>
		/// <remarks>Deletes based on primary key(s).</remarks>
		/// <returns>Returns true if operation suceeded.</returns>
		public bool Delete(System.String _cdMeseInizioFornitura, System.String _cdPuntoFornitura)
		{
			return Delete(null, _cdMeseInizioFornitura, _cdPuntoFornitura);
		}
		
		/// <summary>
		/// 	Deletes a row from the DataSource.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_cdMeseInizioFornitura">Mese di attivazione fornitura (switch in). Primary Key.</param>
		/// <param name="_cdPuntoFornitura">Codice identificativo del punto di fornitura (un cliente può avere più punti di fornitura). Primary Key.</param>
		/// <remarks>Deletes based on primary key(s).</remarks>
		/// <returns>Returns true if operation suceeded.</returns>
		public abstract bool Delete(TransactionManager transactionManager, System.String _cdMeseInizioFornitura, System.String _cdPuntoFornitura);		
		
		#endregion Delete Methods
		
		#region Get By Foreign Key Functions
		#endregion

		#region Get By Index Functions
		
		/// <summary>
		/// 	Gets a row from the DataSource based on its primary key.
		/// </summary>
		/// <param name="transactionManager">A <see cref="TransactionManager"/> object.</param>
		/// <param name="key">The unique identifier of the row to retrieve.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <returns>Returns an instance of the Entity class.</returns>
		public override NiSis.Entities.SshUtenzeGas Get(TransactionManager transactionManager, NiSis.Entities.SshUtenzeGasKey key, int start, int pageLength)
		{
			return GetByCdMeseInizioFornituraCdPuntoFornitura(transactionManager, key.CdMeseInizioFornitura, key.CdPuntoFornitura, start, pageLength);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the primary key aaaaaUTENZE_GAS_PK index.
		/// </summary>
		/// <param name="_cdMeseInizioFornitura">Mese di attivazione fornitura (switch in)</param>
		/// <param name="_cdPuntoFornitura">Codice identificativo del punto di fornitura (un cliente può avere più punti di fornitura)</param>
		/// <returns>Returns an instance of the <see cref="NiSis.Entities.SshUtenzeGas"/> class.</returns>
		public NiSis.Entities.SshUtenzeGas GetByCdMeseInizioFornituraCdPuntoFornitura(System.String _cdMeseInizioFornitura, System.String _cdPuntoFornitura)
		{
			int count = -1;
			return GetByCdMeseInizioFornituraCdPuntoFornitura(null,_cdMeseInizioFornitura, _cdPuntoFornitura, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the aaaaaUTENZE_GAS_PK index.
		/// </summary>
		/// <param name="_cdMeseInizioFornitura">Mese di attivazione fornitura (switch in)</param>
		/// <param name="_cdPuntoFornitura">Codice identificativo del punto di fornitura (un cliente può avere più punti di fornitura)</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NiSis.Entities.SshUtenzeGas"/> class.</returns>
		public NiSis.Entities.SshUtenzeGas GetByCdMeseInizioFornituraCdPuntoFornitura(System.String _cdMeseInizioFornitura, System.String _cdPuntoFornitura, int start, int pageLength)
		{
			int count = -1;
			return GetByCdMeseInizioFornituraCdPuntoFornitura(null, _cdMeseInizioFornitura, _cdPuntoFornitura, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the aaaaaUTENZE_GAS_PK index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_cdMeseInizioFornitura">Mese di attivazione fornitura (switch in)</param>
		/// <param name="_cdPuntoFornitura">Codice identificativo del punto di fornitura (un cliente può avere più punti di fornitura)</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NiSis.Entities.SshUtenzeGas"/> class.</returns>
		public NiSis.Entities.SshUtenzeGas GetByCdMeseInizioFornituraCdPuntoFornitura(TransactionManager transactionManager, System.String _cdMeseInizioFornitura, System.String _cdPuntoFornitura)
		{
			int count = -1;
			return GetByCdMeseInizioFornituraCdPuntoFornitura(transactionManager, _cdMeseInizioFornitura, _cdPuntoFornitura, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the aaaaaUTENZE_GAS_PK index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_cdMeseInizioFornitura">Mese di attivazione fornitura (switch in)</param>
		/// <param name="_cdPuntoFornitura">Codice identificativo del punto di fornitura (un cliente può avere più punti di fornitura)</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NiSis.Entities.SshUtenzeGas"/> class.</returns>
		public NiSis.Entities.SshUtenzeGas GetByCdMeseInizioFornituraCdPuntoFornitura(TransactionManager transactionManager, System.String _cdMeseInizioFornitura, System.String _cdPuntoFornitura, int start, int pageLength)
		{
			int count = -1;
			return GetByCdMeseInizioFornituraCdPuntoFornitura(transactionManager, _cdMeseInizioFornitura, _cdPuntoFornitura, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the aaaaaUTENZE_GAS_PK index.
		/// </summary>
		/// <param name="_cdMeseInizioFornitura">Mese di attivazione fornitura (switch in)</param>
		/// <param name="_cdPuntoFornitura">Codice identificativo del punto di fornitura (un cliente può avere più punti di fornitura)</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NiSis.Entities.SshUtenzeGas"/> class.</returns>
		public NiSis.Entities.SshUtenzeGas GetByCdMeseInizioFornituraCdPuntoFornitura(System.String _cdMeseInizioFornitura, System.String _cdPuntoFornitura, int start, int pageLength, out int count)
		{
			return GetByCdMeseInizioFornituraCdPuntoFornitura(null, _cdMeseInizioFornitura, _cdPuntoFornitura, start, pageLength, out count);
		}
		
				
		/// <summary>
		/// 	Gets rows from the datasource based on the aaaaaUTENZE_GAS_PK index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_cdMeseInizioFornitura">Mese di attivazione fornitura (switch in)</param>
		/// <param name="_cdPuntoFornitura">Codice identificativo del punto di fornitura (un cliente può avere più punti di fornitura)</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns an instance of the <see cref="NiSis.Entities.SshUtenzeGas"/> class.</returns>
		public abstract NiSis.Entities.SshUtenzeGas GetByCdMeseInizioFornituraCdPuntoFornitura(TransactionManager transactionManager, System.String _cdMeseInizioFornitura, System.String _cdPuntoFornitura, int start, int pageLength, out int count);
						
		/// <summary>
		/// 	Gets rows from the datasource based on the primary key COMUNIUTENZE_GAS index.
		/// </summary>
		/// <param name="_cdComune">Codice identificativo del comune+</param>
		/// <returns>Returns an instance of the <see cref="TList&lt;SshUtenzeGas&gt;"/> class.</returns>
		public TList<SshUtenzeGas> GetByCdComune(System.String _cdComune)
		{
			int count = -1;
			return GetByCdComune(null,_cdComune, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the COMUNIUTENZE_GAS index.
		/// </summary>
		/// <param name="_cdComune">Codice identificativo del comune+</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="TList&lt;SshUtenzeGas&gt;"/> class.</returns>
		public TList<SshUtenzeGas> GetByCdComune(System.String _cdComune, int start, int pageLength)
		{
			int count = -1;
			return GetByCdComune(null, _cdComune, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the COMUNIUTENZE_GAS index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_cdComune">Codice identificativo del comune+</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="TList&lt;SshUtenzeGas&gt;"/> class.</returns>
		public TList<SshUtenzeGas> GetByCdComune(TransactionManager transactionManager, System.String _cdComune)
		{
			int count = -1;
			return GetByCdComune(transactionManager, _cdComune, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the COMUNIUTENZE_GAS index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_cdComune">Codice identificativo del comune+</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="TList&lt;SshUtenzeGas&gt;"/> class.</returns>
		public TList<SshUtenzeGas> GetByCdComune(TransactionManager transactionManager, System.String _cdComune, int start, int pageLength)
		{
			int count = -1;
			return GetByCdComune(transactionManager, _cdComune, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the COMUNIUTENZE_GAS index.
		/// </summary>
		/// <param name="_cdComune">Codice identificativo del comune+</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="TList&lt;SshUtenzeGas&gt;"/> class.</returns>
		public TList<SshUtenzeGas> GetByCdComune(System.String _cdComune, int start, int pageLength, out int count)
		{
			return GetByCdComune(null, _cdComune, start, pageLength, out count);
		}
		
				
		/// <summary>
		/// 	Gets rows from the datasource based on the COMUNIUTENZE_GAS index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_cdComune">Codice identificativo del comune+</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns an instance of the <see cref="TList&lt;SshUtenzeGas&gt;"/> class.</returns>
		public abstract TList<SshUtenzeGas> GetByCdComune(TransactionManager transactionManager, System.String _cdComune, int start, int pageLength, out int count);
						
		/// <summary>
		/// 	Gets rows from the datasource based on the primary key TIPOLOG_PRELIEVO_AEEGUTENZE_GAS index.
		/// </summary>
		/// <param name="_cdPrelievoAeeg">Codice identificativo della categoria di prelievo</param>
		/// <returns>Returns an instance of the <see cref="TList&lt;SshUtenzeGas&gt;"/> class.</returns>
		public TList<SshUtenzeGas> GetByCdPrelievoAeeg(System.String _cdPrelievoAeeg)
		{
			int count = -1;
			return GetByCdPrelievoAeeg(null,_cdPrelievoAeeg, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the TIPOLOG_PRELIEVO_AEEGUTENZE_GAS index.
		/// </summary>
		/// <param name="_cdPrelievoAeeg">Codice identificativo della categoria di prelievo</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="TList&lt;SshUtenzeGas&gt;"/> class.</returns>
		public TList<SshUtenzeGas> GetByCdPrelievoAeeg(System.String _cdPrelievoAeeg, int start, int pageLength)
		{
			int count = -1;
			return GetByCdPrelievoAeeg(null, _cdPrelievoAeeg, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the TIPOLOG_PRELIEVO_AEEGUTENZE_GAS index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_cdPrelievoAeeg">Codice identificativo della categoria di prelievo</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="TList&lt;SshUtenzeGas&gt;"/> class.</returns>
		public TList<SshUtenzeGas> GetByCdPrelievoAeeg(TransactionManager transactionManager, System.String _cdPrelievoAeeg)
		{
			int count = -1;
			return GetByCdPrelievoAeeg(transactionManager, _cdPrelievoAeeg, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the TIPOLOG_PRELIEVO_AEEGUTENZE_GAS index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_cdPrelievoAeeg">Codice identificativo della categoria di prelievo</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="TList&lt;SshUtenzeGas&gt;"/> class.</returns>
		public TList<SshUtenzeGas> GetByCdPrelievoAeeg(TransactionManager transactionManager, System.String _cdPrelievoAeeg, int start, int pageLength)
		{
			int count = -1;
			return GetByCdPrelievoAeeg(transactionManager, _cdPrelievoAeeg, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the TIPOLOG_PRELIEVO_AEEGUTENZE_GAS index.
		/// </summary>
		/// <param name="_cdPrelievoAeeg">Codice identificativo della categoria di prelievo</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="TList&lt;SshUtenzeGas&gt;"/> class.</returns>
		public TList<SshUtenzeGas> GetByCdPrelievoAeeg(System.String _cdPrelievoAeeg, int start, int pageLength, out int count)
		{
			return GetByCdPrelievoAeeg(null, _cdPrelievoAeeg, start, pageLength, out count);
		}
		
				
		/// <summary>
		/// 	Gets rows from the datasource based on the TIPOLOG_PRELIEVO_AEEGUTENZE_GAS index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_cdPrelievoAeeg">Codice identificativo della categoria di prelievo</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns an instance of the <see cref="TList&lt;SshUtenzeGas&gt;"/> class.</returns>
		public abstract TList<SshUtenzeGas> GetByCdPrelievoAeeg(TransactionManager transactionManager, System.String _cdPrelievoAeeg, int start, int pageLength, out int count);
						
		#endregion "Get By Index Functions"
	
		#region Custom Methods
		
		
		#region UtenzeGasStoricoUpdateAll 
		
		/// <summary>
		///	This method wrap the 'UtenzeGasStoricoUpdateAll' stored procedure. 
		/// </summary>
		/// <param name="idBatch"> A <c>System.Int32?</c> instance.</param>
		/// <param name="idState"> A <c>System.Int32?</c> instance.</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		public void UtenzeGasStoricoUpdateAll(System.Int32? idBatch, System.Int32? idState)
		{
			 UtenzeGasStoricoUpdateAll(null, 0, int.MaxValue , idBatch, idState);
		}
		
		/// <summary>
		///	This method wrap the 'UtenzeGasStoricoUpdateAll' stored procedure. 
		/// </summary>
		/// <param name="idBatch"> A <c>System.Int32?</c> instance.</param>
		/// <param name="idState"> A <c>System.Int32?</c> instance.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		public void UtenzeGasStoricoUpdateAll(int start, int pageLength, System.Int32? idBatch, System.Int32? idState)
		{
			 UtenzeGasStoricoUpdateAll(null, start, pageLength , idBatch, idState);
		}
				
		/// <summary>
		///	This method wrap the 'UtenzeGasStoricoUpdateAll' stored procedure. 
		/// </summary>
		/// <param name="idBatch"> A <c>System.Int32?</c> instance.</param>
		/// <param name="idState"> A <c>System.Int32?</c> instance.</param>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		public void UtenzeGasStoricoUpdateAll(TransactionManager transactionManager, System.Int32? idBatch, System.Int32? idState)
		{
			 UtenzeGasStoricoUpdateAll(transactionManager, 0, int.MaxValue , idBatch, idState);
		}
		
		/// <summary>
		///	This method wrap the 'UtenzeGasStoricoUpdateAll' stored procedure. 
		/// </summary>
		/// <param name="idBatch"> A <c>System.Int32?</c> instance.</param>
		/// <param name="idState"> A <c>System.Int32?</c> instance.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		public abstract void UtenzeGasStoricoUpdateAll(TransactionManager transactionManager, int start, int pageLength , System.Int32? idBatch, System.Int32? idState);
		
		#endregion
		
		#region CleanUpHistory 
		
		/// <summary>
		///	This method wrap the 'CleanUpHistory' stored procedure. 
		/// </summary>
		/// <param name="cdMese"> A <c>System.String</c> instance.</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		public void CleanUpHistory(System.String cdMese)
		{
			 CleanUpHistory(null, 0, int.MaxValue , cdMese);
		}
		
		/// <summary>
		///	This method wrap the 'CleanUpHistory' stored procedure. 
		/// </summary>
		/// <param name="cdMese"> A <c>System.String</c> instance.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		public void CleanUpHistory(int start, int pageLength, System.String cdMese)
		{
			 CleanUpHistory(null, start, pageLength , cdMese);
		}
				
		/// <summary>
		///	This method wrap the 'CleanUpHistory' stored procedure. 
		/// </summary>
		/// <param name="cdMese"> A <c>System.String</c> instance.</param>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		public void CleanUpHistory(TransactionManager transactionManager, System.String cdMese)
		{
			 CleanUpHistory(transactionManager, 0, int.MaxValue , cdMese);
		}
		
		/// <summary>
		///	This method wrap the 'CleanUpHistory' stored procedure. 
		/// </summary>
		/// <param name="cdMese"> A <c>System.String</c> instance.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		public abstract void CleanUpHistory(TransactionManager transactionManager, int start, int pageLength , System.String cdMese);
		
		#endregion
		
		#region GetUtenze 
		
		/// <summary>
		///	This method wrap the 'GetUtenze' stored procedure. 
		/// </summary>
		/// <param name="cdPool"> A <c>System.String</c> instance.</param>
		/// <param name="cdMese"> A <c>System.String</c> instance.</param>
		/// <param name="cdTraderPrec"> A <c>System.String</c> instance.</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="DataSet"/> instance.</returns>
		public DataSet GetUtenze(System.String cdPool, System.String cdMese, System.String cdTraderPrec)
		{
			return GetUtenze(null, 0, int.MaxValue , cdPool, cdMese, cdTraderPrec);
		}
		
		/// <summary>
		///	This method wrap the 'GetUtenze' stored procedure. 
		/// </summary>
		/// <param name="cdPool"> A <c>System.String</c> instance.</param>
		/// <param name="cdMese"> A <c>System.String</c> instance.</param>
		/// <param name="cdTraderPrec"> A <c>System.String</c> instance.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="DataSet"/> instance.</returns>
		public DataSet GetUtenze(int start, int pageLength, System.String cdPool, System.String cdMese, System.String cdTraderPrec)
		{
			return GetUtenze(null, start, pageLength , cdPool, cdMese, cdTraderPrec);
		}
				
		/// <summary>
		///	This method wrap the 'GetUtenze' stored procedure. 
		/// </summary>
		/// <param name="cdPool"> A <c>System.String</c> instance.</param>
		/// <param name="cdMese"> A <c>System.String</c> instance.</param>
		/// <param name="cdTraderPrec"> A <c>System.String</c> instance.</param>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="DataSet"/> instance.</returns>
		public DataSet GetUtenze(TransactionManager transactionManager, System.String cdPool, System.String cdMese, System.String cdTraderPrec)
		{
			return GetUtenze(transactionManager, 0, int.MaxValue , cdPool, cdMese, cdTraderPrec);
		}
		
		/// <summary>
		///	This method wrap the 'GetUtenze' stored procedure. 
		/// </summary>
		/// <param name="cdPool"> A <c>System.String</c> instance.</param>
		/// <param name="cdMese"> A <c>System.String</c> instance.</param>
		/// <param name="cdTraderPrec"> A <c>System.String</c> instance.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="DataSet"/> instance.</returns>
		public abstract DataSet GetUtenze(TransactionManager transactionManager, int start, int pageLength , System.String cdPool, System.String cdMese, System.String cdTraderPrec);
		
		#endregion
		
		#region ConsolidateUsr 
		
		/// <summary>
		///	This method wrap the 'ConsolidateUsr' stored procedure. 
		/// </summary>
		/// <param name="cdMeseAnno"> A <c>System.String</c> instance.</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		public void ConsolidateUsr(System.String cdMeseAnno)
		{
			 ConsolidateUsr(null, 0, int.MaxValue , cdMeseAnno);
		}
		
		/// <summary>
		///	This method wrap the 'ConsolidateUsr' stored procedure. 
		/// </summary>
		/// <param name="cdMeseAnno"> A <c>System.String</c> instance.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		public void ConsolidateUsr(int start, int pageLength, System.String cdMeseAnno)
		{
			 ConsolidateUsr(null, start, pageLength , cdMeseAnno);
		}
				
		/// <summary>
		///	This method wrap the 'ConsolidateUsr' stored procedure. 
		/// </summary>
		/// <param name="cdMeseAnno"> A <c>System.String</c> instance.</param>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		public void ConsolidateUsr(TransactionManager transactionManager, System.String cdMeseAnno)
		{
			 ConsolidateUsr(transactionManager, 0, int.MaxValue , cdMeseAnno);
		}
		
		/// <summary>
		///	This method wrap the 'ConsolidateUsr' stored procedure. 
		/// </summary>
		/// <param name="cdMeseAnno"> A <c>System.String</c> instance.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		public abstract void ConsolidateUsr(TransactionManager transactionManager, int start, int pageLength , System.String cdMeseAnno);
		
		#endregion
		
		#region UpdateUtenzeState 
		
		/// <summary>
		///	This method wrap the 'UpdateUtenzeState' stored procedure. 
		/// </summary>
		/// <param name="idTraderPrecedente"> A <c>System.Int32?</c> instance.</param>
		/// <param name="newIdStato"> A <c>System.Int32?</c> instance.</param>
		/// <param name="nota"> A <c>System.String</c> instance.</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		public void UpdateUtenzeState(System.Int32? idTraderPrecedente, System.Int32? newIdStato, System.String nota)
		{
			 UpdateUtenzeState(null, 0, int.MaxValue , idTraderPrecedente, newIdStato, nota);
		}
		
		/// <summary>
		///	This method wrap the 'UpdateUtenzeState' stored procedure. 
		/// </summary>
		/// <param name="idTraderPrecedente"> A <c>System.Int32?</c> instance.</param>
		/// <param name="newIdStato"> A <c>System.Int32?</c> instance.</param>
		/// <param name="nota"> A <c>System.String</c> instance.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		public void UpdateUtenzeState(int start, int pageLength, System.Int32? idTraderPrecedente, System.Int32? newIdStato, System.String nota)
		{
			 UpdateUtenzeState(null, start, pageLength , idTraderPrecedente, newIdStato, nota);
		}
				
		/// <summary>
		///	This method wrap the 'UpdateUtenzeState' stored procedure. 
		/// </summary>
		/// <param name="idTraderPrecedente"> A <c>System.Int32?</c> instance.</param>
		/// <param name="newIdStato"> A <c>System.Int32?</c> instance.</param>
		/// <param name="nota"> A <c>System.String</c> instance.</param>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		public void UpdateUtenzeState(TransactionManager transactionManager, System.Int32? idTraderPrecedente, System.Int32? newIdStato, System.String nota)
		{
			 UpdateUtenzeState(transactionManager, 0, int.MaxValue , idTraderPrecedente, newIdStato, nota);
		}
		
		/// <summary>
		///	This method wrap the 'UpdateUtenzeState' stored procedure. 
		/// </summary>
		/// <param name="idTraderPrecedente"> A <c>System.Int32?</c> instance.</param>
		/// <param name="newIdStato"> A <c>System.Int32?</c> instance.</param>
		/// <param name="nota"> A <c>System.String</c> instance.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		public abstract void UpdateUtenzeState(TransactionManager transactionManager, int start, int pageLength , System.Int32? idTraderPrecedente, System.Int32? newIdStato, System.String nota);
		
		#endregion
		
		#region GetUtenzeAll 
		
		/// <summary>
		///	This method wrap the 'GetUtenzeAll' stored procedure. 
		/// </summary>
		/// <param name="cdPool"> A <c>System.String</c> instance.</param>
		/// <param name="cdMese"> A <c>System.String</c> instance.</param>
		/// <param name="cdTraderPrec"> A <c>System.String</c> instance.</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="DataSet"/> instance.</returns>
		public DataSet GetUtenzeAll(System.String cdPool, System.String cdMese, System.String cdTraderPrec)
		{
			return GetUtenzeAll(null, 0, int.MaxValue , cdPool, cdMese, cdTraderPrec);
		}
		
		/// <summary>
		///	This method wrap the 'GetUtenzeAll' stored procedure. 
		/// </summary>
		/// <param name="cdPool"> A <c>System.String</c> instance.</param>
		/// <param name="cdMese"> A <c>System.String</c> instance.</param>
		/// <param name="cdTraderPrec"> A <c>System.String</c> instance.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="DataSet"/> instance.</returns>
		public DataSet GetUtenzeAll(int start, int pageLength, System.String cdPool, System.String cdMese, System.String cdTraderPrec)
		{
			return GetUtenzeAll(null, start, pageLength , cdPool, cdMese, cdTraderPrec);
		}
				
		/// <summary>
		///	This method wrap the 'GetUtenzeAll' stored procedure. 
		/// </summary>
		/// <param name="cdPool"> A <c>System.String</c> instance.</param>
		/// <param name="cdMese"> A <c>System.String</c> instance.</param>
		/// <param name="cdTraderPrec"> A <c>System.String</c> instance.</param>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="DataSet"/> instance.</returns>
		public DataSet GetUtenzeAll(TransactionManager transactionManager, System.String cdPool, System.String cdMese, System.String cdTraderPrec)
		{
			return GetUtenzeAll(transactionManager, 0, int.MaxValue , cdPool, cdMese, cdTraderPrec);
		}
		
		/// <summary>
		///	This method wrap the 'GetUtenzeAll' stored procedure. 
		/// </summary>
		/// <param name="cdPool"> A <c>System.String</c> instance.</param>
		/// <param name="cdMese"> A <c>System.String</c> instance.</param>
		/// <param name="cdTraderPrec"> A <c>System.String</c> instance.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="DataSet"/> instance.</returns>
		public abstract DataSet GetUtenzeAll(TransactionManager transactionManager, int start, int pageLength , System.String cdPool, System.String cdMese, System.String cdTraderPrec);
		
		#endregion
		
		#endregion

		#region Helper Functions	
		
		/// <summary>
		/// Fill a TList&lt;SshUtenzeGas&gt; From a DataReader.
		/// </summary>
		/// <param name="reader">Datareader</param>
		/// <param name="rows">The collection to fill</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">number of rows.</param>
		/// <returns>a <see cref="TList&lt;SshUtenzeGas&gt;"/></returns>
		public static TList<SshUtenzeGas> Fill(IDataReader reader, TList<SshUtenzeGas> rows, int start, int pageLength)
		{
			NetTiersProvider currentProvider = DataRepository.Provider;
            bool useEntityFactory = currentProvider.UseEntityFactory;
            bool enableEntityTracking = currentProvider.EnableEntityTracking;
            LoadPolicy currentLoadPolicy = currentProvider.CurrentLoadPolicy;
			
			// advance to the starting row
			for (int i = 0; i < start; i++)
			{
				if (!reader.Read())
				return rows; // not enough rows, just return
			}
			for (int i = 0; i < pageLength; i++)
			{
				if (!reader.Read())
					break; // we are done
					
				string key = null;
				
				NiSis.Entities.SshUtenzeGas c = null;
				if (useEntityFactory)
				{
					key = new System.Text.StringBuilder("SshUtenzeGas")
					.Append("|").Append((reader.IsDBNull(((int)NiSis.Entities.SshUtenzeGasColumn.CdMeseInizioFornitura - 1))?string.Empty:(System.String)reader[((int)NiSis.Entities.SshUtenzeGasColumn.CdMeseInizioFornitura - 1)]).ToString())
					.Append("|").Append((reader.IsDBNull(((int)NiSis.Entities.SshUtenzeGasColumn.CdPuntoFornitura - 1))?string.Empty:(System.String)reader[((int)NiSis.Entities.SshUtenzeGasColumn.CdPuntoFornitura - 1)]).ToString()).ToString();
					c = EntityManager.LocateOrCreate<SshUtenzeGas>(
					key.ToString(), // EntityTrackingKey
					"SshUtenzeGas",  //Creational Type
					currentProvider.EntityCreationalFactoryType,  //Factory used to create entity
					currentProvider.EnableEntityTracking); // Track this entity?
				}
				else
				{
					c = new NiSis.Entities.SshUtenzeGas();
				}
				
				if (!enableEntityTracking ||
					c.EntityState == EntityState.Added ||
					(enableEntityTracking &&
						(
							(currentLoadPolicy == LoadPolicy.PreserveChanges && c.EntityState == EntityState.Unchanged) ||
							(currentLoadPolicy == LoadPolicy.DiscardChanges && (c.EntityState == EntityState.Unchanged || c.EntityState == EntityState.Changed))
						)
					))
				{
					c.SuppressEntityEvents = true;
					c.CdMeseInizioFornitura = (System.String)reader[((int)SshUtenzeGasColumn.CdMeseInizioFornitura - 1)];
					c.OriginalCdMeseInizioFornitura = c.CdMeseInizioFornitura;
					c.CdCliente = (reader.IsDBNull(((int)SshUtenzeGasColumn.CdCliente - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.CdCliente - 1)];
					c.DsCliente = (reader.IsDBNull(((int)SshUtenzeGasColumn.DsCliente - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.DsCliente - 1)];
					c.CdAteco = (reader.IsDBNull(((int)SshUtenzeGasColumn.CdAteco - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.CdAteco - 1)];
					c.CdPuntoFornitura = (System.String)reader[((int)SshUtenzeGasColumn.CdPuntoFornitura - 1)];
					c.OriginalCdPuntoFornitura = c.CdPuntoFornitura;
					c.CdPool = (reader.IsDBNull(((int)SshUtenzeGasColumn.CdPool - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.CdPool - 1)];
					c.CdComune = (reader.IsDBNull(((int)SshUtenzeGasColumn.CdComune - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.CdComune - 1)];
					c.ConsumoAnnuoStimato = (reader.IsDBNull(((int)SshUtenzeGasColumn.ConsumoAnnuoStimato - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.ConsumoAnnuoStimato - 1)];
					c.CdPrelievoAeeg = (reader.IsDBNull(((int)SshUtenzeGasColumn.CdPrelievoAeeg - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.CdPrelievoAeeg - 1)];
					c.CdTraderPrecedente = (reader.IsDBNull(((int)SshUtenzeGasColumn.CdTraderPrecedente - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.CdTraderPrecedente - 1)];
					c.CdStatoPunto = (reader.IsDBNull(((int)SshUtenzeGasColumn.CdStatoPunto - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.CdStatoPunto - 1)];
					c.SAreaUscita = (reader.IsDBNull(((int)SshUtenzeGasColumn.SAreaUscita - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.SAreaUscita - 1)];
					c.EntityTrackingKey = key;
					c.AcceptChanges();
					c.SuppressEntityEvents = false;
				}
				rows.Add(c);
			}
		return rows;
		}		
		/// <summary>
		/// Refreshes the <see cref="NiSis.Entities.SshUtenzeGas"/> object from the <see cref="IDataReader"/>.
		/// </summary>
		/// <param name="reader">The <see cref="IDataReader"/> to read from.</param>
		/// <param name="entity">The <see cref="NiSis.Entities.SshUtenzeGas"/> object to refresh.</param>
		public static void RefreshEntity(IDataReader reader, NiSis.Entities.SshUtenzeGas entity)
		{
			if (!reader.Read()) return;
			
			entity.CdMeseInizioFornitura = (System.String)reader[((int)SshUtenzeGasColumn.CdMeseInizioFornitura - 1)];
			entity.OriginalCdMeseInizioFornitura = (System.String)reader["CD_MESE_INIZIO_FORNITURA"];
			entity.CdCliente = (reader.IsDBNull(((int)SshUtenzeGasColumn.CdCliente - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.CdCliente - 1)];
			entity.DsCliente = (reader.IsDBNull(((int)SshUtenzeGasColumn.DsCliente - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.DsCliente - 1)];
			entity.CdAteco = (reader.IsDBNull(((int)SshUtenzeGasColumn.CdAteco - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.CdAteco - 1)];
			entity.CdPuntoFornitura = (System.String)reader[((int)SshUtenzeGasColumn.CdPuntoFornitura - 1)];
			entity.OriginalCdPuntoFornitura = (System.String)reader["CD_PUNTO_FORNITURA"];
			entity.CdPool = (reader.IsDBNull(((int)SshUtenzeGasColumn.CdPool - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.CdPool - 1)];
			entity.CdComune = (reader.IsDBNull(((int)SshUtenzeGasColumn.CdComune - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.CdComune - 1)];
			entity.ConsumoAnnuoStimato = (reader.IsDBNull(((int)SshUtenzeGasColumn.ConsumoAnnuoStimato - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.ConsumoAnnuoStimato - 1)];
			entity.CdPrelievoAeeg = (reader.IsDBNull(((int)SshUtenzeGasColumn.CdPrelievoAeeg - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.CdPrelievoAeeg - 1)];
			entity.CdTraderPrecedente = (reader.IsDBNull(((int)SshUtenzeGasColumn.CdTraderPrecedente - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.CdTraderPrecedente - 1)];
			entity.CdStatoPunto = (reader.IsDBNull(((int)SshUtenzeGasColumn.CdStatoPunto - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.CdStatoPunto - 1)];
			entity.SAreaUscita = (reader.IsDBNull(((int)SshUtenzeGasColumn.SAreaUscita - 1)))?null:(System.String)reader[((int)SshUtenzeGasColumn.SAreaUscita - 1)];
			entity.AcceptChanges();
		}
		
		/// <summary>
		/// Refreshes the <see cref="NiSis.Entities.SshUtenzeGas"/> object from the <see cref="DataSet"/>.
		/// </summary>
		/// <param name="dataSet">The <see cref="DataSet"/> to read from.</param>
		/// <param name="entity">The <see cref="NiSis.Entities.SshUtenzeGas"/> object.</param>
		public static void RefreshEntity(DataSet dataSet, NiSis.Entities.SshUtenzeGas entity)
		{
			DataRow dataRow = dataSet.Tables[0].Rows[0];
			
			entity.CdMeseInizioFornitura = (System.String)dataRow["CD_MESE_INIZIO_FORNITURA"];
			entity.OriginalCdMeseInizioFornitura = (System.String)dataRow["CD_MESE_INIZIO_FORNITURA"];
			entity.CdCliente = Convert.IsDBNull(dataRow["CD_CLIENTE"]) ? null : (System.String)dataRow["CD_CLIENTE"];
			entity.DsCliente = Convert.IsDBNull(dataRow["DS_CLIENTE"]) ? null : (System.String)dataRow["DS_CLIENTE"];
			entity.CdAteco = Convert.IsDBNull(dataRow["CD_ATECO"]) ? null : (System.String)dataRow["CD_ATECO"];
			entity.CdPuntoFornitura = (System.String)dataRow["CD_PUNTO_FORNITURA"];
			entity.OriginalCdPuntoFornitura = (System.String)dataRow["CD_PUNTO_FORNITURA"];
			entity.CdPool = Convert.IsDBNull(dataRow["CD_POOL"]) ? null : (System.String)dataRow["CD_POOL"];
			entity.CdComune = Convert.IsDBNull(dataRow["CD_COMUNE"]) ? null : (System.String)dataRow["CD_COMUNE"];
			entity.ConsumoAnnuoStimato = Convert.IsDBNull(dataRow["CONSUMO_ANNUO_STIMATO"]) ? null : (System.String)dataRow["CONSUMO_ANNUO_STIMATO"];
			entity.CdPrelievoAeeg = Convert.IsDBNull(dataRow["CD_PRELIEVO_AEEG"]) ? null : (System.String)dataRow["CD_PRELIEVO_AEEG"];
			entity.CdTraderPrecedente = Convert.IsDBNull(dataRow["CD_TRADER_PRECEDENTE"]) ? null : (System.String)dataRow["CD_TRADER_PRECEDENTE"];
			entity.CdStatoPunto = Convert.IsDBNull(dataRow["CD_STATO_PUNTO"]) ? null : (System.String)dataRow["CD_STATO_PUNTO"];
			entity.SAreaUscita = Convert.IsDBNull(dataRow["S_AREA_USCITA"]) ? null : (System.String)dataRow["S_AREA_USCITA"];
			entity.AcceptChanges();
		}
		#endregion 
		
		#region DeepLoad Methods
		/// <summary>
		/// Deep Loads the <see cref="IEntity"/> object with criteria based of the child 
		/// property collections only N Levels Deep based on the <see cref="DeepLoadType"/>.
		/// </summary>
		/// <remarks>
		/// Use this method with caution as it is possible to DeepLoad with Recursion and traverse an entire object graph.
		/// </remarks>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="entity">The <see cref="NiSis.Entities.SshUtenzeGas"/> object to load.</param>
		/// <param name="deep">Boolean. A flag that indicates whether to recursively save all Property Collection that are descendants of this instance. If True, saves the complete object graph below this object. If False, saves this object only. </param>
		/// <param name="deepLoadType">DeepLoadType Enumeration to Include/Exclude object property collections from Load.</param>
		/// <param name="childTypes">NiSis.Entities.SshUtenzeGas Property Collection Type Array To Include or Exclude from Load</param>
		/// <param name="innerList">A collection of child types for easy access.</param>
	    /// <exception cref="ArgumentNullException">entity or childTypes is null.</exception>
	    /// <exception cref="ArgumentException">deepLoadType has invalid value.</exception>
		public override void DeepLoad(TransactionManager transactionManager, NiSis.Entities.SshUtenzeGas entity, bool deep, DeepLoadType deepLoadType, System.Type[] childTypes, DeepSession innerList)
		{
			if(entity == null)
				return;
			
			//used to hold DeepLoad method delegates and fire after all the local children have been loaded.
			Dictionary<string, KeyValuePair<Delegate, object>> deepHandles = new Dictionary<string, KeyValuePair<Delegate, object>>();
			
			//Fire all DeepLoad Items
			foreach(KeyValuePair<Delegate, object> pair in deepHandles.Values)
		    {
                pair.Key.DynamicInvoke((object[])pair.Value);
		    }
			deepHandles = null;
		}
		
		#endregion 
		
		#region DeepSave Methods

		/// <summary>
		/// Deep Save the entire object graph of the NiSis.Entities.SshUtenzeGas object with criteria based of the child 
		/// Type property array and DeepSaveType.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="entity">NiSis.Entities.SshUtenzeGas instance</param>
		/// <param name="deepSaveType">DeepSaveType Enumeration to Include/Exclude object property collections from Save.</param>
		/// <param name="childTypes">NiSis.Entities.SshUtenzeGas Property Collection Type Array To Include or Exclude from Save</param>
		/// <param name="innerList">A Hashtable of child types for easy access.</param>
		public override bool DeepSave(TransactionManager transactionManager, NiSis.Entities.SshUtenzeGas entity, DeepSaveType deepSaveType, System.Type[] childTypes, DeepSession innerList)
		{	
			if (entity == null)
				return false;
							
			#region Composite Parent Properties
			//Save Source Composite Properties, however, don't call deep save on them.  
			//So they only get saved a single level deep.
			#endregion Composite Parent Properties

			// Save Root Entity through Provider
			if (!entity.IsDeleted)
				this.Save(transactionManager, entity);
			
			//used to hold DeepSave method delegates and fire after all the local children have been saved.
			Dictionary<string, KeyValuePair<Delegate, object>> deepHandles = new Dictionary<string, KeyValuePair<Delegate, object>>();
			//Fire all DeepSave Items
			foreach(KeyValuePair<Delegate, object> pair in deepHandles.Values)
		    {
                pair.Key.DynamicInvoke((object[])pair.Value);
		    }
			
			// Save Root Entity through Provider, if not already saved in delete mode
			if (entity.IsDeleted)
				this.Save(transactionManager, entity);
				

			deepHandles = null;
						
			return true;
		}
		#endregion
	} // end class
	
	#region SshUtenzeGasChildEntityTypes
	
	///<summary>
	/// Enumeration used to expose the different child entity types 
	/// for child properties in <c>NiSis.Entities.SshUtenzeGas</c>
	///</summary>
	public enum SshUtenzeGasChildEntityTypes
	{
	}
	
	#endregion SshUtenzeGasChildEntityTypes
	
	#region SshUtenzeGasFilterBuilder
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;SshUtenzeGasColumn&gt;"/> class
	/// that is used exclusively with a <see cref="SshUtenzeGas"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class SshUtenzeGasFilterBuilder : SqlFilterBuilder<SshUtenzeGasColumn>
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the SshUtenzeGasFilterBuilder class.
		/// </summary>
		public SshUtenzeGasFilterBuilder() : base() { }

		/// <summary>
		/// Initializes a new instance of the SshUtenzeGasFilterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public SshUtenzeGasFilterBuilder(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the SshUtenzeGasFilterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public SshUtenzeGasFilterBuilder(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion SshUtenzeGasFilterBuilder
	
	#region SshUtenzeGasParameterBuilder
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ParameterizedSqlFilterBuilder&lt;SshUtenzeGasColumn&gt;"/> class
	/// that is used exclusively with a <see cref="SshUtenzeGas"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class SshUtenzeGasParameterBuilder : ParameterizedSqlFilterBuilder<SshUtenzeGasColumn>
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the SshUtenzeGasParameterBuilder class.
		/// </summary>
		public SshUtenzeGasParameterBuilder() : base() { }

		/// <summary>
		/// Initializes a new instance of the SshUtenzeGasParameterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public SshUtenzeGasParameterBuilder(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the SshUtenzeGasParameterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public SshUtenzeGasParameterBuilder(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion SshUtenzeGasParameterBuilder
	
	#region SshUtenzeGasSortBuilder
    
    /// <summary>
    /// A strongly-typed instance of the <see cref="SqlSortBuilder&lt;SshUtenzeGasColumn&gt;"/> class
	/// that is used exclusively with a <see cref="SshUtenzeGas"/> object.
    /// </summary>
    [CLSCompliant(true)]
    public class SshUtenzeGasSortBuilder : SqlSortBuilder<SshUtenzeGasColumn>
    {
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the SshUtenzeGasSqlSortBuilder class.
		/// </summary>
		public SshUtenzeGasSortBuilder() : base() { }

		#endregion Constructors

    }    
    #endregion SshUtenzeGasSortBuilder
	
} // end namespace
